<template>
    <div class="textBox">
        <h4>{{textList.title}}</h4>
        <hr>
        <div class="content" v-html="textList.content">  
        </div>
    </div>
</template>

<script>
export default {
    data(){
        return{
            textList:[]
        }
    },
    created() {
        this.getText();
    },
    methods: {
        async getText(){
            const arr = window.location.hash.split("=");
            const id = arr[1];
            const res=await this.$http.get('/api/goods/getdesc/'+id);
            this.textList=res.data.message[0];
        }
    },
}
</script>

<style lang="less" scoped>
h4{
    color: #226aff;
    font-size: 16px;
    text-align: center;
    margin:15px 0;
    }
.content{
     text-align: left;
     padding: 0 10px;
    p{
        text-align: left;
    }
    img{
        display: block;
        background-color: pink;
        width: 100%;
        height: 500px;
    }
}
</style>